﻿namespace TopHero
{
    public class CellEntity : BaseEntity
    {
        protected Game _game;
        protected Cell _cell;
        protected IViewObject _viewObject;

        internal CellEntity(Game game, Cell cell)
        {
            _game = game;
            _cell = cell;
            position = cell.position;
        }

        internal override void Start()
        {
            _viewObject = _game.viewService.CreateEmptyCellView();
            _viewObject.Link(this);
        }

        internal override void Update()
        {
        }

        internal override void Destroy()
        {
            _viewObject.Unlink();
        }
    }
}